<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
     <base href="<%=basePath%>">
    
    <title>My JSP 'add.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="css/css.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.9.1.min.js"></script>
	<script src="laydate/laydate.js"></script>
	<script>
	
	function end(){
	window.location.href = "marketing/marketing.do";       
    } 
    
    
    function tijiao(){

	  var dingjin=document.f1.dingjin.value;
	   var fangshi=document.f1.paymenttypeid.value;

	   if(dingjin==null || dingjin=="")
	   {
	    
	     alert("定金不能为空");
	   }else{
	 
	      if(fangshi==null)
	    {
	  
	     alert("付款方式不能为空");
	    }else{
	    
	     
	   
	       f1.submit();
	       
	   
	   }
	   
	   
	   
	   }
	     
    } 
    
    
	
	</script>
	
	
	<script src="js/jquery-1.9.1.min.js"></script>
  </head>
  
  <body>
  <form action="bargain/bargainzadd.do" method="post" name="f1">
 <input type="hidden" name="userid" value="${user.id}">
 <input type="hidden" name="clientid" value="${client.id}">
 <input type="hidden" name="roomid" value="${room.id}">
<input type="hidden" name="maketingid" value="${marketing}">
 <table width="100%" border="0" cellpadding="0" cellspacing="1" class="ybox04table">
           
            <tr>
              <td class="ybox04tdr" colspan="6">详细信息</td>
              </tr>
            <tr>
              <td  class="ybox04tdl"><span class="red">*</span> 客户姓名：</td>
              <td  class="ybox04tdr"><input name="clientname" type="text" value="${client.clientidname}" readonly="readonly"/></td>
              <td class="ybox04tdl"><span class="red">*</span> 联系方式：</td>
              <td class="ybox04tdr"><input name="clinetelephone" type="text" value="${client.phone}" readonly="readonly"/></td>
              <td class="ybox04tdl">付款方式：</td>
               <td class="ybox04tdr">
              <select name="paymenttypeid" id="paymenttypeid">
              <option value="一次性付款">-----一次性付款-------</option>
              <option value="分期付款">-------分期付款-------</option>
              <option value="按揭付款">-------按揭付款-------</option>
             
               </select>
               
               </td>
            </tr>
            
            <tr>
            
              <td  class="ybox04tdl"><span class="red">*</span>房间编号:</td>
             <td class="ybox04tdr"><input name="roomnumber" type="text" value="${room.roomnumber}" readonly="readonly"/></td>
              <td  class="ybox04tdl"><span class="red">*</span>业务员姓名:</td>
             <td class="ybox04tdr"><input name="uuu" type="text" value="${user.username}" readonly="readonly"/></td>
              <td  class="ybox04tdl"></td>
             <td class="ybox04tdr"></td>
              
           </tr>   
            <tr>
            
              <td  class="ybox04tdl"><span class="red">*</span>单价/每平米:</td>
             <td class="ybox04tdr"><input name="roomprice" type="text" value="${room.roomprice}" readonly="readonly"/></td>
              <td  class="ybox04tdl"><span class="red">*</span>总价：</td>
             <td class="ybox04tdr"><input name="roomtotal" id="roomtotal" type="text" value="${room.roomtotal}" readonly="readonly"/></td>
             <td  class="ybox04tdl"><span class="red">*</span>购买面积：</td>
             <td class="ybox04tdr"><input name="area" type="text" readonly="readonly" value="${room.area}" readonly="readonly"/></td>
            
              
           </tr>   
            
           <tr>
            
              <td  class="ybox04tdl"><span class="red"></span>合同总价：</td>
             <td class="ybox04tdr" ><input name="roomtotal" id="roomtotal" type="text" value="${room.roomtotal}" readonly="readonly"/>
             <span id="erro" style="color: red;"></span>       
             </td>
             <td  class="ybox04tdl"><span class="red">*</span> 甲方：</td>
              <td  class="ybox04tdr"><input name="jname" type="text" value="万达" readonly="readonly"/></td>
              
              <td  class="ybox04tdl"><span class="red">*</span> 乙方：</td>
              <td  class="ybox04tdr"><input name="nn" type="text" value="${client.clientidname}" readonly="readonly"/></td>
              
           </tr>
           
            <tr>
            
              <td  class="ybox04tdl"><span class="red"></span>合同内容：</td>
             <td class="ybox04tdr" ><input name="content" id="content" type="text"/>
             <span id="erro" style="color: red;"></span>       
             </td>
             <td  class="ybox04tdl"><span class="red">*</span> 签约时间：</td>
              <td  class="ybox04tdr"><input name="signedtime" type="text" value="${date}" readonly="readonly"/>
       
              </td>
              
              <td  class="ybox04tdl"><span class="red">*</span> 定金：</td>
              <td  class="ybox04tdr"><input name="dingjin" type="text"/></td>
              
           </tr>
  
             <tr>
              <td  class="ybox04tdr"  colspan="8"><input type="button" onclick="tijiao()" value="提交"/>
               <input type="button" value="取消" onclick="end()"/>  </td>
            </tr>
          </table>
          
          </form>
  
  
  
  
  </body>
</html>





